package com.roroldo.springcloud.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * 容器注册组件类
 * @author 落霞不孤
 */
@Configuration
public class ApplicationContextConfig {

    @Bean
    // 启用负载均衡
    // @LoadBalanced
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }
}
